package com.ry.ryshopweb.service;


import com.ry.ryshopweb.vo.PageObject;
import com.ry.ryshopweb.vo.ShopItem;
import com.ry.ryshopweb.vo.Size;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class TestItemsImpl implements TestItems {
    @Override
    public PageObject<ShopItem> getItems(Integer pageCurrent) {
        List<Size> sizeList1 = new ArrayList<>();
        List<Size> sizeList2 = new ArrayList<>();
        List<Size> sizeList3 = new ArrayList<>();
        List<Size> sizeList4 = new ArrayList<>();
        List<Size> sizeList5 = new ArrayList<>();
        List<Size> sizeList6 = new ArrayList<>();
        List<Size> sizeList7 = new ArrayList<>();
        List<Size> sizeList8 = new ArrayList<>();
        List<Size> sizeList9 = new ArrayList<>();
        List<Size> sizeList10 = new ArrayList<>();
        sizeList1.add(new Size(11l,"红色"));
        sizeList1.add(new Size(12l,"绿色"));
        sizeList2.add(new Size(21l,"红色"));
        sizeList2.add(new Size(22l,"绿色"));
        sizeList3.add(new Size(31l,"红色"));
        sizeList3.add(new Size(32l,"绿色"));
        sizeList4.add(new Size(41l,"红色"));
        sizeList4.add(new Size(42l,"绿色"));
        sizeList5.add(new Size(51l,"红色"));
        sizeList5.add(new Size(52l,"绿色"));
        sizeList6.add(new Size(61l,"红色"));
        sizeList6.add(new Size(62l,"绿色"));
        sizeList7.add(new Size(71l,"红色"));
        sizeList7.add(new Size(72l,"绿色"));
        sizeList8.add(new Size(81l,"红色"));
        sizeList8.add(new Size(82l,"绿色"));
        sizeList9.add(new Size(91l,"红色"));
        sizeList9.add(new Size(92l,"绿色"));
        sizeList10.add(new Size(101l,"红色"));
        sizeList10.add(new Size(102l,"绿色"));
        List<ShopItem> list = new ArrayList<>();
        list.add(new ShopItem(1l,"测试数据1",100L,"/images/banner.jpg",1l,sizeList1,new Date(),new Date(),"测试数据描述1",1000l,"/images/banner.jpg"));
        list.add(new ShopItem(2l,"测试数据2",200L,"/images/banner.jpg",2l,sizeList2,new Date(),new Date(),"测试数据描述2",2000l,"/images/banner.jpg"));
        list.add(new ShopItem(3l,"测试数据3",300L,"/images/banner.jpg",3l,sizeList3,new Date(),new Date(),"测试数据描述3",3000l,"/images/banner.jpg"));
        list.add(new ShopItem(4l,"测试数据4",400L,"/images/banner.jpg",4l,sizeList4,new Date(),new Date(),"测试数据描述4",4000l,"/images/banner.jpg"));
        list.add(new ShopItem(5l,"测试数据5",500L,"/images/banner.jpg",5l,sizeList5,new Date(),new Date(),"测试数据描述5",5000l,"/images/banner.jpg"));
        list.add(new ShopItem(6l,"测试数据6",600L,"/images/banner.jpg",6l,sizeList6,new Date(),new Date(),"测试数据描述6",6000l,"/images/banner.jpg"));
        list.add(new ShopItem(7l,"测试数据7",700L,"/images/banner.jpg",7l,sizeList7,new Date(),new Date(),"测试数据描述7",7000l,"/images/banner.jpg"));
        list.add(new ShopItem(8l,"测试数据8",800L,"/images/banner.jpg",8l,sizeList8,new Date(),new Date(),"测试数据描述8",8000l,"/images/banner.jpg"));
        list.add(new ShopItem(9l,"测试数据9",900L,"/images/banner.jpg",9l,sizeList9,new Date(),new Date(),"测试数据描述9",9000l,"/images/banner.jpg"));
        list.add(new ShopItem(10l,"测试数据10",1000L,"/images/banner.jpg",10l,sizeList10,new Date(),new Date(),"测试数据描述10",10000l,"/images/banner.jpg"));
        PageObject<ShopItem> listPageObject = new PageObject<ShopItem>(45,list,pageCurrent,10);
        return listPageObject;
    }
}
